﻿@model _1._6._2015_EF_Pair.Models.PersonsViewModel

@{
    ViewBag.Title = "Home Page";
}


<div class="row">
    <h2>Persons in Persons Database</h2>
    <div class="col-md-12">
        <table class="table table-bordered table-striped">
            <tr>
                <th>First Name</th>
                <th>Last Name</th>
                <th></th>
            </tr>
            @foreach(var person in Model.Persons)
            {
                <tr>
                    <td>@person.FirstName</td>
                    <td>@person.LastName</td>
                    <td>@Html.ActionLink("Update Person", "UpdatePerson", new { firstName = person.FirstName, lastName = person.LastName })</td>
                </tr>
            }
        </table>
        

    </div>
    
    
</div>